/**
 * 后台js 方法 
 * 
**/
KindEditor.ready(function(K){
	var wy_kind_editor = [];
	// 基础
	$(".wy-type-basics").each(function(){
		var name = $(this).attr("name");
		wy_kind_editor[name] = K.create("textarea[name='"+name+"']", {
			uploadJson : Kind_upload_json,
			fileManagerJson : Kind_file_manager_json,
			allowFileManager : true,
			filterMode : false,
			items : ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist'],
			afterBlur: function(){wy_kind_editor[name].sync();}
		});	
	});
	// 简单
	$(".wy-type-simple").each(function(){
		var name = $(this).attr("name");
		wy_kind_editor[name] = K.create("textarea[name='"+name+"']", {
			uploadJson : Kind_upload_json,
			fileManagerJson : Kind_file_manager_json,
			allowFileManager : true,
			filterMode : false,
			items : [
				'source', '|', 'undo', 'redo', '|', 'preview', 'cut', 'copy', 'paste',
				'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
				'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
				'video','insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
				'anchor', 'link', 'unlink'
			],
			afterBlur: function(){wy_kind_editor[name].sync();}
		});	
	});
	// 完整
	$(".wy-type-complete").each(function(){
		var name = $(this).attr("name");
		wy_kind_editor[name] = K.create("textarea[name='"+name+"']", {
			uploadJson : Kind_upload_json,
			fileManagerJson : Kind_file_manager_json,
			allowFileManager : true,
			filterMode : false,
			afterBlur: function(){wy_kind_editor[name].sync();}
		});	
	});
		
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
});